package com.xmy.cultivate.entity.views;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xmy.cultivate.converter.LocalDateConverter;
import com.xmy.cultivate.enums.ReachTypeEnum;
import com.xmy.cultivate.enums.StatusRecordEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 上课记录
 */
@Data
public class StudentClassLogRep {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private Long id;

    @ExcelIgnore
    private Long schedulingDetailId;

    @ExcelProperty(index = 7, value = "请假课次")
    private Integer lessonNum;

    /**
     * 校区id
     */
    @ExcelIgnore
    private Long schoolId;

    @ExcelIgnore
    private String schoolName;

    @ExcelIgnore
    private Long courseId;

    @ExcelIgnore
    private String courseName;

    /**
     * 班级id
     */
    @ExcelIgnore
    private Long gradeId;

    @ExcelProperty(index = 3, value = "班级")
    private String gradeName;

    /**
     * 老师id
     */
    @ExcelIgnore
    private Long teacherId;

    @ExcelProperty(index = 9, value = "教师")
    private String teacherName;

    /**
     * 上课教室id
     */
    @ExcelIgnore
    private Long classRoomId;

    @ExcelIgnore
    private String classRoomName;

    /**
     * 学生id
     */
    @ExcelIgnore
    private Long studentId;

    @ExcelProperty(index = 2, value = "学员姓名")
    private String studentName;


    @ExcelIgnore
    private Integer yearPart;

    @ExcelIgnore
    private Integer quarterNum;

    @ExcelIgnore
    private Integer yearAndQuarter;

    /**
     * 科目id
     */
    @ExcelIgnore
    private Long subjectsId;

    @ExcelProperty(index = 6, value = "科目")
    private String subjectsName;

    /**
     * 上课日期
     */
    @ExcelProperty(index = 0, value = "上课日期", converter = LocalDateConverter.class)
    private LocalDate schoolDate;

    @ExcelProperty(index = 1, value = "上课时段")
    private String schoolTime;

    /**
     * 上课开始时间
     */
    @ExcelIgnore
    private String timeStart;

    /**
     * 上课结束时间
     */
    @ExcelIgnore
    private String timeEnd;

    /**
     * 1到课，2请假，3旷课
     */
    @ExcelIgnore
    private StatusRecordEnum status;

    @ExcelProperty(index = 8, value = "到课状态")
    private String statusName;

    @ExcelIgnore
    private Integer isRepair;

    @ExcelIgnore
    private Long repairId;

    @ExcelIgnore
    private Integer type;

    /**
     * 1正常，2迟到
     */
    @ExcelIgnore
    private ReachTypeEnum reachType;

    @ExcelIgnore
    private Integer buckleClassHouse;

    /**
     * 是否扣除了课时
     */
    @ExcelIgnore
    private Integer isDeductHouse;

    @ExcelIgnore
    private Integer isDeductMoney;

    @ExcelIgnore
    private BigDecimal buckleClassMoney;

    @ExcelIgnore
    private Integer teacherGetHouse;

    @ExcelIgnore
    private Integer yearClassId;

    @ExcelProperty(index = 4, value = "年级")
    private String yearClassStr;

    @ExcelIgnore
    private BigDecimal teacherGetMoney;


    /**
     * 请假次数
     */
    @ExcelIgnore
    private Integer LeaveTimes;

    /**
     * 补课次数
     */
    @ExcelIgnore
    private Integer MakeUpTimes;

    /**
     * 安排补课信息的结束时间
     */
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime repairDate;

    @ExcelProperty(index = 10, value = "补课日期")
    private String repairDateStr;

    /**
     * 超时的上课日期
     */
    @ExcelIgnore
    private String passRepairDateStr;

    @ExcelIgnore
    private String repairGradeName;

    @ExcelIgnore
    private String repairTeacherName;

    @ExcelIgnore
    private Integer courseType;

    @ExcelProperty(index = 12, value = "补课状态")
    private String isRepairName;

    @ExcelIgnore
    private Integer deductType;

    @ExcelIgnore
    private String remark;

    @ExcelIgnore
    private Long courseTypeId;

    @ExcelProperty(index = 5, value = "班型")
    private String courseTypeStr;

    @ExcelIgnore
    private Integer checkType;

    @ExcelIgnore
    private Integer takeCheckType;

    @ExcelIgnore
    private Integer studentCount;

    @ExcelIgnore
    private Integer takeStudentCount;

    @ExcelIgnore
    private Integer isCheckCount;

    @ExcelIgnore
    private Integer lessonType;

    @ExcelIgnore
    @ApiModelProperty("剩余课时")
    @TableField(exist = false)
    private Integer residueCourseCount;

    @ExcelIgnore
    @ApiModelProperty("剩余金额")
    @TableField(exist = false)
    private BigDecimal residuePrice;

    @ExcelIgnore
    @ApiModelProperty("使用课时")
    @TableField(exist = false)
    private Long useCourseCount;

    /**
     * 是否有请假
     */
    @ExcelIgnore
    private Integer leaveCount;

    @ExcelIgnore
    private Long byRecordId;

    @ExcelIgnore
    private LocalDate minSchoolDate;

    @ExcelIgnore
    private LocalDate maxSchoolDate;

    @ExcelProperty(index = 11, value = "禁补日期", converter = LocalDateConverter.class)
    @ApiModelProperty("禁补日期")
    private LocalDate backDate;

    @ExcelIgnore
    private Integer total;

    private Integer weekDate;


}
